﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_DeleteBasicReference')
	BEGIN
		DROP  Procedure  esf_sso.P_DeleteBasicReference
	END
GO

CREATE Procedure esf_sso.P_DeleteBasicReference
(
	@pBasicReferenceID		BIGINT
)
AS

	DELETE FROM esf_sso.BasicReference_Location WHERE BasicReferenceID = @pBasicReferenceID
	
	DELETE FROM [esf_sso].[BasicReference] WHERE ID = @pBasicReferenceID
	
GO 